import request from './request';
const Format = {
    // 文件上传器
    fileUploader(formData, url) {
        return new Promise((resolve, reject) => {
            request.request({
                url: 'http://localhost:3301' + url,
                method: 'post',
                data: formData,
                timeout: undefined,
                headers: {
                    'Content-Type': 'multipart/form-data;'
                }
            }).then((res) => {
                resolve(res);
            }).catch(err => {
                reject(err)
            });
        });
    }
};
export default Format;